package com.wjm.demo.test1.net_test.udp_socket_test.chat;

import java.net.DatagramSocket;

/**
 * 案例：网络聊天室
 */
public class ChatDemo {
    public static int port = 10000;

    public static void main(String[] args) {

        try {
            DatagramSocket send = new DatagramSocket();
            new Thread(new Send(send)).start();

            DatagramSocket rece = new DatagramSocket(port);
            new Thread(new Rece(rece)).start();

        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
